<template>
  <div class="about">
    <h1>This is an about page</h1>
    <span></span>
    <div>
      加数1:<input v-model="myplush.num1"><br>
      加数2:<input v-model="myplush.num2"><br>
      <span>请输入结果:{{myplush.result}}</span>
      <button @click="cal">确定</button>
    </div>
  </div>
</template>
<script>
export default {
  name: 'aboutView',
  data: function () {
    return {
      myplush: {
        num1: 0,
        num2: 0,
        result: 0
      }
    }
  },

  methods: {
    cal: function () {
      this.myplush.result = parseInt(this.myplush.num2) + parseInt(this.myplush.num1)
    }
  }
}
</script>
